In communication channels, data must be transmitted through the channel reliably. Data is represented as a sequence of bits, with each bit taking a value of zero or one. In a data storage device, the channel includes a storage medium on which the data is written and then read back. The data is written to the storage medium through a write channel and is read from the storage medium through a read channel.
One method of increasing the reliability of the data transmitted through a communication channel is to use an error correcting code (ECC). A simple ECC code is based on parity. A parity bit is added to a group of data bits, such as a data word, and has a logic state that is selected to make the total number of ones (or zeros) in the data word either even or odd. The original data word is then transmitted through the channel along with the additional parity bit as a modified data word. The modified data word is received from the channel and an ECC decoder checks the parity of the word against an expected value. If the parity is correct, the ECC detector assumes there are no bit errors. If the parity is incorrect, the ECC detection circuit assumes there is an error in the transmitted data.
More complex ECC codes have also been used for enabling not only detection of additional errors but also correction of some of the detected errors. For example, a single-error correction, double-error detection (SEC-DED) Hamming code adds enough additional parity bits to enable the detection circuit to detect and correct any single-bit error in a data word and detect two-bit errors. A Reed Solomon ECC Code corrects symbols (groups of bits) not bits. Reed Solomon Error Correcting Codes are often used in data storage systems, such as in disc drives. The main purpose of the ECC is to correct any errors occurring during the read back of data from the storage medium. In a disc drive, user data is formatted into sectors. Each sector typically includes 512 bytes of user data. The data of each sector is encoded into an ECC codeword. Each codeword contains the user data and the redundancy (parity symbols) generated by the encoder. The correction capability of each code is determined by the quantity of redundancy. With more redundancy, more error can be corrected. However, more redundancy reduces the area at which the user data can be stored on the storage medium. Also, severe errors usually are not evenly distributed over data sectors. Therefore, distributing redundancy uniformly in all sectors may not be an effective use of added redundancy. A standard sector-based ECC provides an equal number of redundant symbols for equal protection in each sector. But typically very few sectors make use of the full correction capability. Since extremely severe errors are not likely to occur frequently, many of the redundant symbols will not be utilized but will still take up storage space.
Improved encoding techniques are therefore desired for increasing correction capability of an ECC code while limiting the storage area consumed by the code. Embodiments of the present invention provide solutions to these and other problems and offer other advantages over the prior art.